package io.writer;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class Demo01 {
    public static void main(String[] args) throws IOException {
        File file = new File("F://Test//T2//b.txt");
        //FileWriter fileWriter = new FileWriter(file,true);可追加为true
        FileWriter fileWriter = new FileWriter(file);

        String s = "我是最棒的";
        char[] chars = s.toCharArray();
        fileWriter.write(chars);
        fileWriter.flush();
    }
}
